package com.itlong.cloud.project.operate;

import com.itlong.cloud.POJO.DTO.operate.OperatePushInfoPageDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateSavePushInfoDTO;
import com.itlong.cloud.POJO.VO.operate.OperatePushInfoOneVO;
import com.itlong.cloud.POJO.VO.operate.OperatePushInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <desc>
 *      运营-运营管理-消息推送接口暴露。
 * <desc/>
 *
 * @createDate 2017/9/29.
 */
@FeignClient(name = "project-service")
public interface IOperatePushInfoServiceClient {

     /**
      * <desc>
      *      保存消息推送内容。
      * <desc/>
      *
      * @param  pushInfoDTO 消息推送传输数据对象
      * @return  返回影响行数
      * @author shengen.T
      * @createDate 2017/9/29
      */
    @RequestMapping(path="/operate/marketer/pushInfo/savePushInfo",method = RequestMethod.POST)
    Integer savePushInfo(@RequestBody OperateSavePushInfoDTO pushInfoDTO) throws Exception;


     /**
      * <desc>
      *      修改消息推送内容。
      * <desc/>
      *
      * @param  pushInfoDTO 消息推送数据传输对象
      * @return 返回影响行数
      * @author shengen.T
      * @createDate 2017/9/29
      */
     @RequestMapping(path = "/operate/marketer/pushInfo/updatePushInfo",method = RequestMethod.POST)
    Integer updatePushInfo(@RequestBody OperateSavePushInfoDTO pushInfoDTO) throws Exception;

      /**
       * <desc>
       *      批量删除消息列表信息。
       * <desc/>
       *
       * @param  pushInfoIds 消息ID列表
       * @return  返回影响行数
       * @author shengen.T
       * @createDate 2017/9/29
       */
      @RequestMapping(path = "/operate/marketer/pushInfo/deletePushInfo", method = RequestMethod.POST)
     Integer deletePushInfo(@RequestParam("pushInfoIds")String pushInfoIds) throws  Exception;

       /**
        * <desc>
        *      根据推送消息ID获取具体详细信息。
        * <desc/>
        *
        * @param  pushInfoId 消息推送ID
        * @return
        * @author shengen.T
        * @createDate 2017/9/29
        */
      @RequestMapping(path = "/operate/marketer/pushInfo/getPushInfo/{pushInfoId}", method = RequestMethod.GET)
      OperatePushInfoOneVO getPushInfo(@PathVariable("pushInfoId") String pushInfoId) throws Exception;

       /**
        * <desc>
        *      获取推送消息分页列表信息。
        * <desc/>
        *
        * @param pageDTO 请求参数对象
        * @return 返回分页查询信息
        * @author shengen.T
        * @createDate 2017/9/29
        */
      @RequestMapping(path = "/operate/marketer/pushInfo/getPushInfoPage",method = RequestMethod.POST)
      Page<OperatePushInfoVO> getPushInfoPage(@RequestBody OperatePushInfoPageDTO pageDTO) throws Exception;


       /**
        * <desc>
        *      获取允许推送的列表信息。
        * <desc/>
        *
        * @param
        * @return  返回推送列表信息
        * @author shengen.T
        * @createDate 2017/10/27
        */
    @RequestMapping(path = "/operate/marketer/pushInfo/getEnabledPushInfoList",method = RequestMethod.POST)
    List<OperatePushInfoVO>  getEnabledPushInfoList() throws Exception;

     /**
      * <desc>
      *      批量设置发布状态。
      * <desc/>
      *
      * @param  pushInfoIds
      * @return 返回影响行数
      * @author shengen.T
      * @createDate 2017/10/27
      */
    @RequestMapping(path = "/operate/marketer/pushInfo/setPushStatus/{pushInfoIds}",method = RequestMethod.POST)
    Integer setPushStatus(@PathVariable("pushInfoIds") String pushInfoIds) throws Exception;

    /**
     * <desc>
     *      获取当前时间某项目允许推送的最新推送消息
     * <desc/>
     *
     * @param projectId 项目id
     * @return
     * @author Chunjian.G
     * @createDate 2017-11-08
     */
    @RequestMapping(path = "/operate/marketer/pushInfo/getLatestPushContent",method = RequestMethod.POST)
    List<String> getLatestPushContent(@RequestParam(name = "projectId") String projectId) throws Exception;

     /**
      * <desc>
      *      定期检测过期推送消息并改变状态。
      * <desc/>
      *
      * @param
      * @return  true更新成功 false更新失败
      * @author shengen.T
      * @createDate 2017-12-04
      */
    @RequestMapping(path = "/operate/marketer/pushInfo/checkOverDatePushTimeTask",method = RequestMethod.POST)
    boolean checkOverDatePushTimeTask() throws Exception;

    /**
     * <desc>
     *      获取当前时间某项目允许推送的最新推送消息标题
     * <desc/>
     *
     * @param projectId 项目id
     * @return
     * @author Juguang.S
     * @createDate 2019-08-28
     */
    @RequestMapping(path = "/operate/marketer/pushInfo/getLatestPushTitle",method = RequestMethod.POST)
    List<String> getLatestPushTitle(@RequestParam(name = "projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      获取app历史版本号列表
     * </desc>
     *
     * @author wangzhi
     * @createDate 2020/04/29
     */
    @RequestMapping(path = "/operate/marketer/pushInfo/getAppVersionList", method = RequestMethod.POST)
    List<String> getAppVersionList() throws Exception;

    /**
     * <desc>
     *      处理旧推送数据，一次性接口，将原来的app推送数据复制一份作为小程序的推送数据，发布后第一时间运行该接口
     * </desc>
     *
     * @author wangzhi
     * @createDate 2020/04/29
     */
    @RequestMapping(path = "/operate/marketer/pushInfo/copyAppPushInfoToMiniProgram", method = RequestMethod.POST)
    Integer copyAppPushInfoToMiniProgram() throws Exception;
}
